package com.first.module.acm.action;

import java.util.Map;

import javax.annotation.Resource;

import com.first.core.util.AppUtil;
import com.first.core.web.action.BaseAction;
import com.first.module.acm.model.AppWebsite;
import com.first.module.acm.service.AppWebsiteService;

public class AppWebsiteAction extends BaseAction {

	@Resource
	private AppWebsiteService appWebsiteService;

	private AppWebsite appWebsite;

	 public String add()
	  {
	    this.appWebsiteService.save(this.appWebsite);
	    Map map = AppUtil.getSysConfig();
	    map.remove("app.websiteName");
	    map.put("app.copyright", this.appWebsite.getCopyright());
	    map.put("app.websiteName", this.appWebsite.getWebsiteName());
	    setJsonString("{success:true}");
	    return "success";
	  }
}
